package com.leyou.auth.config;

import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSBuilder;
import com.aliyun.oss.OSSClientBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * @Author 张伟奇
 * @Date 2021/7/16 19:16
 * @description
 * @Version 1.0
 **/
@Configuration
public class OSSConfig {
    @Bean
    public OSS ossClient(OSSProperties prop){
        return new OSSClientBuilder()
                .build(prop.getEndpoint(),prop.getAccessKeyId(),prop.getAccesskeySecret());
    }
}
